#include <stdio.h>

int main(int argc, char *argv[])
{
	int n, i, j, w;
	int s[100];
	for (i=0; i<100; i++) s[i] = 0;

	scanf("%d", &n);

	s[0] = 2;
	w = 0;
	for (i=0; i<n; i++) {
		for (j=0; j<80; j++) {
			s[j] = s[j] * 2 + w;
			w = s[j] / 10;
			if (s[j] > 9) s[j] -= 10;
		}
	}
	s[0] -= 2;

	for (i=80; i>=0; i--) {
		if (s[i] != 0) break;
	}
	for (; i>=0; i--) {
		printf("%d", s[i]);
	}
	printf("\n");

	return 0;
}
